package agent.strategy;

import agent.strategy.builders.BuildExchangeLogin;
import agent.strategy.builders.BuildExchangeLogout;
import agent.strategy.builders.BuildSelectMarketAndView;
import agent.strategy.builders.BuildSelectMarketAndViewRepeatedly;
import api.*;
import org.apache.axis2.AxisFault;
import utils.Display;

import java.util.concurrent.ScheduledExecutorService;

/**
 * User: Darren
 * Date: 18/05/13
 * Time: 1:50 PM
 */
public class StrategyBuilders {
    public BuildSelectMarketAndView buildSelectBefairMarketAndView;
    public BuildSelectMarketAndViewRepeatedly buildSelectBetairMarketAndViewRepeatedlyForOneMinute;
    public BuildExchangeLogin buildBefairExchangeLogin;
    public BuildExchangeLogout buildBetfairExchangeLogout;

    public StrategyBuilders(APIFactory apiFactory, MarketFactory marketFactory, Display display,
                            ScheduledExecutorService scheduler) throws AxisFault {
        buildBefairExchangeLogin = new BuildExchangeLogin(apiFactory.getAPI(APITypes.BETFAIR_FREE_ACCESS), display);
        buildBetfairExchangeLogout = new BuildExchangeLogout(apiFactory.getAPI(APITypes.BETFAIR_FREE_ACCESS), display);
        buildSelectBefairMarketAndView =
                new BuildSelectMarketAndView(apiFactory.getAPI(APITypes.BETFAIR_FREE_ACCESS), marketFactory, display);
        buildSelectBetairMarketAndViewRepeatedlyForOneMinute =
                new BuildSelectMarketAndViewRepeatedly(apiFactory.getAPI(APITypes.BETFAIR_FREE_ACCESS),
                marketFactory, display, scheduler, 60, MarketType.BETFAIR_MARKET);
    }

}